from wormbane.model.armor import Armor
from wormbane.util.string import substring_before

class Scales(Armor):
    kind = 'scales'
    beatitude = 'uncursed'
    enchantment = 0
    desc_attrs = ('beatitude_prefix', 'enchantment_prefix', 'set_of_prefix',
                  'race_prefix', 'kind')

    @property
    def set_of_prefix(self):
        return 'set of'

    @property
    def race_prefix(self):
        return substring_before(self.material, '_')
